package cn.com.headfree.mouldshow.dao.impl;

import cn.com.headfree.entity.IscUser;
import cn.com.headfree.mouldshow.dao.IscUserDao;
import com.gta.edu.sdk.base.dao.impl.BaseDaoImpl;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository("/iscUserDao")
public class IscUserDaoImpl extends BaseDaoImpl<IscUser> implements IscUserDao {


    @Override
    public List<IscUser> findByBaseorgId(String baseorgId) {
        Object[] params=new Object[1];
        String sql="select * from isc_user t where t.BASEORG_ID=?";
        StringBuilder sb=new StringBuilder(sql);
        params[0]=baseorgId;
        return this.findAllBySQL(IscUser.class,sb.toString(),null,false,params);
    }

    @Override
    public List<IscUser> getIscUserListByFax(String fax) {
        Object[] params=new Object[1];
        String sql="select t.id from isc_user t where t.fax=?";
        params[0]=fax;
        return this.findAllBySQL(IscUser.class,sql,null,false,params);
    }
}
